﻿@using Grand.Core;
@using Grand.Framework.Themes
@using Grand.Framework.UI
@inject IWorkContext workContext
@inject IThemeContext themeContext
@inject IPageHeadBuilder pagebuilder
@{
    var supportRtl = workContext.WorkingLanguage.Rtl;
    var themeName = themeContext.WorkingThemeName;

    if (supportRtl)
    {
        pagebuilder.AppendCssFileParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/css/common/common.rtl.css", themeName));
    }
    else
    {
        pagebuilder.AppendCssFileParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/css/common/common.css", themeName));
    }

    pagebuilder.AppendCssFileParts(ResourceLocation.Head, "~/content/custom/style.css");
    pagebuilder.AppendCssFileParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/css/animate.min.css", themeName));
    pagebuilder.AppendCssFileParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/bootstrap-vue/bootstrap-vue.min.css", themeName));
    pagebuilder.AppendCssFileParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/bootstrap-vue/bootstrap.min.css", themeName));


    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/script/validation-config.min.js", themeName), excludeFromBundle: true);
    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/script/vee-validate.minimal.min.js", themeName));
    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/script/vue-awesome-countdown.umd.min.js", themeName), excludeFromBundle: true);
    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/script/axios.min.js", themeName));
    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/script/public.axios.js", themeName));
    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/script/public.common.js", themeName));
    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/vue/bootstrap-vue-icons-slim.min.js", themeName), excludeFromBundle: true);
    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/vue/bootstrap-vue.min.js", themeName), excludeFromBundle: true);
    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/vue/portal-vue.umd.min.js", themeName), excludeFromBundle: true);
    pagebuilder.AppendScriptParts(ResourceLocation.Head, string.Format("~/Themes/{0}/Content/vue/vue.min.js", themeName), excludeFromBundle: true);

    pagebuilder.AppendScriptParts(ResourceLocation.Footer, string.Format("~/Themes/{0}/Content/script/menu.js", themeName));
    pagebuilder.AppendScriptParts(ResourceLocation.Footer, "~/content/bootstrap/popper.min.js");
    pagebuilder.AppendScriptParts(ResourceLocation.Footer, "~/content/custom/script.js");

}